home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / PGUIDE / FIRSTAPP / FORM1.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-09-16  |  2.6 KB  |  84 lines

  1. VERSION 5.00
  2. Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Bookstore"
  5.    ClientHeight    =   5490
  6.    ClientLeft      =   330
  7.    ClientTop       =   1305
  8.    ClientWidth     =   6630
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   5490
  11.    ScaleWidth      =   6630
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton Command2 
  14.       Caption         =   "Exit"
  15.       Height          =   375
  16.       Left            =   5280
  17.       TabIndex        =   3
  18.       Top             =   4920
  19.       Width           =   1215
  20.    End
  21.    Begin VB.CommandButton Command1 
  22.       Caption         =   "Clear"
  23.       Height          =   375
  24.       Left            =   120
  25.       TabIndex        =   2
  26.       Top             =   4920
  27.       Width           =   1215
  28.    End
  29.    Begin VB.Data Data1 
  30.       Caption         =   "Data1"
  31.       Connect         =   "Access"
  32.       DatabaseName    =   "C:\vb5\Biblio.mdb"
  33.       DefaultCursorType=   0  'DefaultCursor
  34.       DefaultType     =   2  'UseODBC
  35.       Exclusive       =   0   'False
  36.       Height          =   300
  37.       Left            =   120
  38.       Options         =   0
  39.       ReadOnly        =   0   'False
  40.       RecordsetType   =   1  'Dynaset
  41.       RecordSource    =   "All Titles"
  42.       Top             =   4440
  43.       Width           =   6375
  44.    End
  45.    Begin VB.ListBox List1 
  46.       Height          =   1260
  47.       Left            =   120
  48.       TabIndex        =   1
  49.       Top             =   3000
  50.       Width           =   6375
  51.    End
  52.    Begin MSDBGrid.DBGrid DBGrid1 
  53.       Bindings        =   "Form1.frx":0000
  54.       Height          =   2655
  55.       Left            =   120
  56.       OleObjectBlob   =   "Form1.frx":0010
  57.       TabIndex        =   0
  58.       Top             =   120
  59.       Width           =   6375
  60.    End
  61. Attribute VB_Name = "Form1"
  62. Attribute VB_Base = "0{65D6EB0C-E9E5-11CF-84BA-00AA00C007F0}"
  63. Attribute VB_GlobalNameSpace = False
  64. Attribute VB_Creatable = False
  65. Attribute VB_TemplateDerived = False
  66. Attribute VB_PredeclaredId = True
  67. Attribute VB_Exposed = False
  68. Option Explicit
  69. Private Sub Command1_Click()
  70.     List1.Clear         ' Clears the listbox
  71. End Sub
  72. Private Sub Command2_Click()
  73.     Unload Form1
  74.     End                 ' Ends application
  75. End Sub
  76. Private Sub Data1_Reposition()
  77.     ' Assign the Title to the caption property
  78.     Data1.Caption = Data1.Recordset("Title")
  79. End Sub
  80. Private Sub DBGrid1_DblClick()
  81.     ' Add the title to the list
  82.     List1.AddItem Data1.Recordset("Title")
  83. End Sub
  84.